package com.example.building_material_mannager.service.impl;

import com.example.building_material_mannager.entity.Product;
import com.example.building_material_mannager.mapper.ProductMapper;
import com.example.building_material_mannager.service.ProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {
    @Resource
    ProductMapper productMapper;


    @Override
    public List<Product> showProduct(Product product) {
        List<Product> products = productMapper.showProduct(product);
        return products;
    }

    @Override
    public boolean addProduct(Product product) {
        boolean re=productMapper.addProduct(product);
        return re;
    }

    @Override
    public boolean delProduct(Integer pid) {
        boolean re=productMapper.delProduct(pid);
        return re;
    }

    @Override
    public boolean upProduct(Product product) {
        boolean re=productMapper.upProduct(product);
        return re;
    }
}
